# <div><span>hello world </span></div>

# <span>hello world </span>
def wrapper1(param):
    print('-------->装饰第一层')
    # print('-------->span标签装饰器')
    # print(param)
    def inner1():
        # print('-------inner ')
        print('-------->这是wrapper1 的inner')
        print('<span>'+param()+"</span>")
        return '<span>'+param()+"</span>"
    return inner1


def wrapper2(param):
    print('------->装饰第二层')
    def inner2():
        print('------wrapper2 的inner')
        print('<div>' + param() + "</div>")
        return '<div>' + param() + "</div>"
    return inner2

@wrapper2
@wrapper1
def test1():
    return 'hello world'

# 结合性 自下而上和执行性  自上而下

if __name__ == '__main__':
    # test1()
    # 手动装饰
    # inner_func = wrapper1(test1)
    # inner_func()

    # 自动装饰
    test1()

